package Day17;

import java.util.Scanner;

/**
 * Creat with IntelliJ IDEA
 * Description
 * User: mamba24
 * Date: 2022-09-30
 * Time: 18:47
 * To BE A Better Person-2020-3-2
 */
public class TestDemo {
    public static void initialarr(int[][] arr){
        arr[0][0]=1;
        for (int i = 1; i < arr.length; i++) {
            arr[i][0]=1;
            for (int j = 1; j < arr[0].length; j++) {
               if(j-2<0){
                   arr[i][j]=arr[i-1][j-1]+arr[i-1][j];
               }else{
                   arr[i][j]=arr[i-1][j-2]+arr[i-1][j-1]+arr[i-1][j];
               }


            }
        }
    }
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int[][] tra=new int[n][2*n+1];
        initialarr(tra);
        for (int i = 0; i < tra[0].length; i++) {
            if(tra[n-1][i]==0){
                break;
            }
            if(tra[n-1][i]%2==0){
                System.out.println(i+1);
                return;
            }
        }
        System.out.println(-1);
    }
}
